from google.appengine.ext import db

class Party(db.Model):
    id = db.IntegerProperty()
    name = db.StringProperty()

class President(db.Model):
    id = db.IntegerProperty()
    name = db.StringProperty()
    start_date = db.DateProperty()
    end_date = db.DateProperty()
    terms = db.IntegerProperty()
    party = db.ReferenceProperty(Party)

class SpeechCategory(db.Model):
    id = db.IntegerProperty()
    name = db.StringProperty()

class SpeechText(db.Model):
    id = db.IntegerProperty()
    president = db.ReferenceProperty(President)
    category = db.ReferenceProperty(SpeechCategory)
    date = db.DateProperty()
